/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sea.util;

import java.io.File;

/**
 * 
 * The filter of saving dialog
 * 
 * @author  Zhirun Ding
 * 
 * Created on 11/07/2012
 * 
 */

public class TxtFilter extends javax.swing.filechooser.FileFilter {
    public boolean accept(File file) {
        return file.getName().toLowerCase().endsWith(".txt")||file.isDirectory();
    }

    public String getDescription() {
        return "Txt File(*.txt)";
    }
}
